﻿using System;
using blackhouse.WebNemo.Business;
using blackhouse.WebNemo.Business.Groups;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace blackhouse.WebNemo.Tests {
    [TestClass]
    public class UnitTest2 {
        [TestMethod]
        public void TestTabs() {

            // test dla zapisu w bazie trzech tabów: Ogólne, Zdjęcia, Opis apartamentu

            IGroup group = Factory.Instance().GetGroup("TYP_APARTAMENTU");
            GroupColumnCollection columns = group.Columns;

            SplitColumns split = Factory.Instance().GetSplitColumns(group);
            Assert.IsTrue(split.DividedIntoTabs);
            Assert.AreEqual(3, split.TabCounts);
            Assert.AreEqual("ogólne", split.GetTabName(0), true);
            Assert.AreEqual("zdjęcia", split.GetTabName(1), true);
            Assert.AreEqual("opis apartamentu", split.GetTabName(2), true);
            GroupColumn[] tab0 = split.GetEditColumns(0);
            GroupColumn[] tab1 = split.GetEditColumns(1);
            GroupColumn[] tab2 = split.GetEditColumns(2);
        }
    }
}
